package sk.fhi.shared.rpc.action;

import sk.fhi.shared.model.AbstractEntity;
import sk.fhi.shared.rpc.AbstractAction;
import sk.fhi.shared.rpc.result.SaveResult;

/**
 * Generic save action 
 * 
 * @author Michal Somora
 *
 */
public class SaveAction extends AbstractAction<SaveResult> {
	
	private AbstractEntity kind;

	public SaveAction(AbstractEntity entity) {
		super();
		this.kind = entity;
	}

	public SaveAction() {
	}
	
	public AbstractEntity getEntity() {
		return kind;
	}

	@Override
	public String getLogMessage() {
		return "Saving entity: "+ kind.toString();
	}

}
